package org.vectrics.recruiter.user;

import java.util.Set;

import org.vectrics.company.Company;
import org.vectrics.user.PersonSearchCriteria;

public class RecruitPersonSearchCriteria extends PersonSearchCriteria {
	
	private static final long serialVersionUID = -2365191099037774340L;

	private boolean candidatesOnly = false;
	private boolean sourcesOnly = false;
	
	public RecruitPersonSearchCriteria(){
		super();
	}

	public RecruitPersonSearchCriteria(PersonSearchCriteria userCriteria) {
		Set<Company> companies = userCriteria.getCompanyList();
		for (Company company : companies){
			this.addCompany(company);	
		}
		this.setLastName(userCriteria.getLastName());
		this.setFirstName(userCriteria.getFirstName());
		this.setRoles(userCriteria.getRoles());
		this.setCity(userCriteria.getCity());
		this.setState(userCriteria.getState());
		this.setAnyPhone(userCriteria.getAnyPhone());
		this.setEmail(userCriteria.getEmail());
		this.setPersonPrivilegeGroupTypes(userCriteria.getPersonPrivilegeGroupTypes());
		this.setCompanyList(userCriteria.getCompanyList());
		this.setGroupTypeList(userCriteria.getGroupTypeList());
		this.setCountry(userCriteria.getCountry());
		this.setShowSystemUsers(userCriteria.getShowSystemUsers());
		this.setEmployeesOnly(userCriteria.getEmployeesOnly());
		this.setShowParentDomainPeople(userCriteria.getShowParentDomainPeople());
		this.setNotEmployees(userCriteria.getNotEmployees());
		this.setGender(userCriteria.getGender());
		this.setCompany(userCriteria.getCompany());
		this.setPost(userCriteria.getPost());
		this.setUniversity(userCriteria.getUniversity());
		this.setCareer(userCriteria.getCareer());
		this.setFieldOfStudy(userCriteria.getFieldOfStudy());
		this.setSkill(userCriteria.getSkill());
	}

	public boolean getCandidatesOnly() {
		return candidatesOnly;
	}

	public void setCandidatesOnly(boolean candidatesOnly) {
		this.candidatesOnly = candidatesOnly;
	}

	public boolean getSourcesOnly() {
		return sourcesOnly;
	}

	public void setSourcesOnly(boolean sourcesOnly) {
		this.sourcesOnly = sourcesOnly;
	}
	
}
